﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Assignment_Search : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        StreamReader reader = File.OpenText(Server.MapPath("Search.htm"));
        string content = reader.ReadToEnd();
        content = Server.HtmlEncode(content); // -> <> -> &lt; &gt;
        content = content.Replace("\r\n", "<br/>");
        content = content.Replace("đường dẫn file", "<span style='background-color:yellow'>đường dẫn file</span>");
        mainContent.Text = content;

        // "name" -> "<span style='background-color:yellow'>name</span>"

        //ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;
        //SqlCommand selectCommand = new SqlCommand("Store Procedure");
        //selectCommand.CommandType = CommandType.StoredProcedure;

        DataClassesDataContext dbContext = new DataClassesDataContext();
        var countries = from c in dbContext.Countries
                        where c.CountryName == "HCM"
                        select c;

    }
}